﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Messaging;
using System.Text;
using System.Threading.Tasks;
using Toolbox;

namespace FremtidensPlejehjem_Infoskærm.Messaging
{
    public class Consumer
    {
        MessageQueue _channel;

        public Consumer(MessageQueue channel)
        {
            _channel = channel;
        }

        public object ReceiveMessage()
        {
            Message msg = _channel.Receive(new TimeSpan(0, 1, 0));

            return msg;
        }
    }
}
